package com.group.transaction.common;

public class IntegralData {

    /**
     * 根据金额计算积分
     * @param money
     * @param total
     * @return
     */
    public static Double getIntegral(Double money,int total) {
        Double data = 0.0;
        if(total <= 20) {
            data = money * 2;
        }else if(total > 20 && total <= 50) {
            data = money * 4;
        }else if(total > 50 && total <= 100) {
            data = money * 4;
        }else {
            data = money * 9;
        }
        return data;
    }

}
